win32 theme: Make titlebuttons look like they're the right size
authorBenjamin Otte <otte@gnome.org>
Fri, 26 Feb 2016 02:17:01 +0000 (03:17 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 26 Feb 2016 02:20:42 +0000 (03:20 +0100)
This is a hack because we can't really rtesize the buttons.

Instead, we draw the background only over the area that they would
be drawn if they were drawn by Windows. The button is still selectable
outside of this area, but what can you do...

gtk/theme/win32/gtk.css

index 525674b3b0f48e04b8ae511b3aac61c77e5c3cf3..846041cb94bd308b6f462369380bbaa14b4b2adf 100644 (file)
@@ -394,6 +394,9 @@ decoration:disabled {
     margin-right: -gtk-win32-size(button, cxedge);
     min-width: calc(-gtk-win32-size(button, cxsize) - 2 * -gtk-win32-size(button, cxedge));
     min-height: calc(-gtk-win32-size(button, cysize) - 2 * -gtk-win32-size(button, cyedge));
+    background-repeat: no-repeat;
+    background-size: 100% calc(-gtk-win32-size(button, cysize) - 2 * -gtk-win32-size(button, cyedge));
+    background-position: 50% calc(100% - -gtk-win32-size(window, cycaption) + -gtk-win32-size(window, cysize) - -gtk-win32-size(window, cyedge));
 }
 
 /* XXX: headerbar insists on 6px spacing between buttons. Windows doesn't